package org.scut.smartgeometry.view.identify_system.shape;

import android.graphics.Path;

import org.scut.smartgeometry.view.identify_system.SGPath;
import org.scut.smartgeometry.view.identify_system.SGPoint;

import java.util.List;

/**
 * Created by Administrator on 13-7-11.
 */
public class SGCircle extends SGShape {

    private float radius;
    private SGPoint center;

    public SGPoint getCenter() {
        return center;
    }

    public float getRadius() {
        return radius;
    }

    public SGCircle(List<SGPoint> points, SGPath path, float radius, SGPoint center) {
        super(points, path);
        this.radius = radius;
        this.center = center;
    }

    public SGCircle(List<SGPoint> points, SGPath path, SGPoint core, float radius, SGPoint center) {
        super(points, path, core);
        this.radius = radius;
        this.center = center;
    }


    @Override
    public void draw() {
        super.draw();

        SGPath path = getPath();

        path.reset();

        path.addCircle(center.getX(), center.getY(), radius, Path.Direction.CW);


    }
}
